home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 17
/
CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso
/
CUCD
/
Programming
/
DiceSource
/
suplib
/
stricmp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-25
|
464b
|
35 lines
/*
* STRICMP.C
*
* (C)Copyright 1990, Matthew Dillon, All Rights Reserved
*/
#include <string.h>
#define CTYPE_NEAR
#include <ctype.h>
#ifndef HYPER
#define HYPER(x) x
#endif
typedef unsigned char ubyte;
int
HYPER(stricmp)(s, d)
const char *s;
const char *d;
{
while (tolower(*(ubyte *)s) == tolower(*(ubyte *)d)) {
if (*s == 0)
return(0);
++s;
++d;
}
if (tolower(*(ubyte *)s) < tolower(*(ubyte *)d))
return(-1);
return(1);
}